package com.itbaiwei.testday01.day01.annotation;

/**
 * Class: Main5
 * Description:
 * Author: haijun.xu
 * Date: 2025/4/25 15:32
 */

enum MyRetentionPolicy {
    SOURCE("在源码中"),
    CLASS("在class文件中"),
    RUNTIME("在运行期");
    private String chineseName;
    MyRetentionPolicy(String chineseName) {
        this.chineseName = chineseName;
    }
    public void show() {
        System.out.println("选择的类型是：" + chineseName);
    }
}

public class Main5 {
    public static void main(String[] args) {
        MyRetentionPolicy aClass = MyRetentionPolicy.CLASS;
        aClass.show();
    }
}
